#
# DoR.R
# Execute R analysis files for 
# Hill, SJ. ``Sidestepping Primary Reform: Political Action in Response to Institutional Change.''
#

rm(list=ls())
if (.Platform$OS == "windows") {
  # Set working directory in location of script.
  .doit <- function() { # only works with R.exe; trap errors if using Rscript.exe
  f_f <- lapply(sys.frames(),function(x) x$ofile);f_f <- Filter(Negate(is.null),f_f) ; PTH <- dirname(f_f[[length(f_f)]]); setwd(PTH) ; rm(PTH,f_f)
  }
  try(.doit(),silent=T)
}

# Required packages.
require(data.table)
require(RColorBrewer)
# Options.
options(stringsAsFactors=F)
palette(brewer.pal(n=9,name="Set1")[c(1:5,7:9)]) # reset default colors
options(digits=4)

#
# Execute files.
#

source("R_PlotBootstrapConleyTaber.R")
